package com.godme.q887;


public class Q887 {


    public int superEggDrop(int k, int n) {
        if(k == 1 || n < 2){
            return n;
        }
        int times = Integer.MAX_VALUE;
        for(int level = 1; level < n+1; level++){
            times = Math.min(times, Math.max(superEggDrop(k-1, level-1), superEggDrop(k, n-level)) + 1);
        }
        return times;
    }

    public static void main(String[] args) {
        System.err.println(new Q887().superEggDrop(3, 14));
    }
}
